﻿#ifndef SCRIPTEDITDIALOG_H
#define SCRIPTEDITDIALOG_H

#include <QDialog>
#include <QListWidgetItem>
#include "codehighlighter.h"
#include "scriptlogdialog.h"
#include "debugdialog.h"

namespace Ui {
class ScriptEditDialog;
}

class ScriptEditDialog : public QDialog
{
    Q_OBJECT

public:
    explicit ScriptEditDialog(QWidget *parent = nullptr);
    ~ScriptEditDialog();

    void addLog(QString type,QString msg);
    void addScriptFile(QString filename);
    void clearScriptFile(void);
    void addScriptcontent(QString content);

Q_SIGNALS:
    void scriptfileitemDoubleClicked(QString filepath);
    void scriptfileupdate(QString filepath,QString content);

private slots:
    void on_listWidget_itemDoubleClicked(QListWidgetItem *item);
    void on_pushButton_clicked();

    void on_tabWidget_currentChanged(int index);

private:
    Ui::ScriptEditDialog *ui;

    CodeHighLighter *m_CodeHighLighter;
    QString m_currentSelectedScriptFile;

    DebugDialog *m_DebugDialog;
    ScriptLogDialog *m_ScriptLogDialog;
};

#endif // SCRIPTEDITDIALOG_H
